package com.nowcoder.community.dao;

import com.nowcoder.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Author: Zhang Dongwei
 * Date: 2023/4/13 21:37
 */
@Mapper
@Repository
public interface UserMapper {

    User selectById(int id);

    User selectByName(String username);

    User selectByEmail(String email);

    int insertUser(User user);

//    int updateStatus(int id, int status);
    int updateStatus(@Param("id") int id, @Param("status") int status);

//    int updateHeader(int id, String headerUrl);
    int updateHeader(@Param("id") int id, @Param("headerUrl") String headerUrl);

//    int updatePassword(int id, String password);
    int updatePassword(@Param("id") int id, @Param("password") String password);

}
